package com.fieldchain.ex.fa100.ui.access;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.fieldchain.ex.fa100.R;
import com.fieldchain.ex.fa100.bean.BankChoseBean;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by biyunlong
 * Email: 1225198434@qq.com
 * Data:  2018/9/13
 */
public class AEmptyAdapter extends RecyclerView.Adapter<AEmptyAdapter.ViewHolder> {
    private Context mContext;

    public AEmptyAdapter(Context mContext) {
        this.mContext = mContext;
    }
    private List<BankChoseBean> list = new ArrayList<>();

    public void setData(List<BankChoseBean> list) {
        this.list.clear();
        this.list.addAll(list);
        notifyDataSetChanged();
    }

    @Override
    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view= LayoutInflater.from(mContext).inflate(R.layout.item_empty,parent,false);
        return new ViewHolder(view);
    }

    @Override
    public void onBindViewHolder(ViewHolder holder, int position) {

    }

    @Override
    public int getItemCount() {
        return list.size();
    }

    public class ViewHolder extends RecyclerView.ViewHolder {
        public ViewHolder(View itemView) {
            super(itemView);
        }
    }
}
